package com.example.forumsystem.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@ApiModel("用户信息")

@Data
public class User {
    @ApiModelProperty("用户id")
    private Long id;
    @ApiModelProperty("用户id")

    private String userName;

    // JsonIgnore 设置不参与序列化
    @JsonIgnore
    @ApiModelProperty("用户id")
    private String password;

    @ApiModelProperty("用户id")
    private String nickName;

    @ApiModelProperty("用户id")
    private String phoneNum;

    @ApiModelProperty("用户id")
    private String email;

    @ApiModelProperty("用户性别")
    private Byte gender;
    // JsonIgnore 设置不参与序列化
    @JsonIgnore
    private String salt;

    private String avatarUrl;

    @ApiModelProperty("用户文章数量")
    private Integer articleCount;

    private Byte isAdmin;

    private String remark;
    // JsonIgnore 设置不参与序列化
    @JsonIgnore
    @ApiModelProperty("用户状态")
    private Byte state;

    private Byte deleteState;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Date createTime;

    private Date updateTime;
}